/**
 * @Author: yy
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-10-28 16:57:33
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
//  查询跟进信息
export const getFollowInfoList = params => axios.get(`${SERVER.CYXDMS_CLUE}/actioned/getFollowRecord`, { params });
//  跟进回访编辑保存
export const updateFollowInfo = params => axios.put(`${SERVER.CYXDMS_CLUE}/actioned/updateFollowRecord`, params );
//  跳转跟进编辑明细
export const getFollowInfoById = (id, ownerCode) => axios.get(`${SERVER.CYXDMS_CLUE}/actioned/getFindActionDetailId?actionId=${id}&shardingOwnerCode=${ownerCode}`, { id: Number(id) });
// 查看是否存在已预约
export const getAppointmentById = (id, ownerCode) => axios.get(`${SERVER.CYXDMS_CLUE}/actioned/queryNoFinishInvitation?customerBusinessId=${id}&shardingOwnerCode=${ownerCode}`, { id: Number(id) });
// 获取无效原因
export const getInvalidReason = params => axios.get(`${SERVER.CYXDMS_CLUE}/customerManage/causeOfInvalidity`, { params });
// 批注
export const addFollowMarkup = params => axios.get(`${SERVER.CYXDMS_CLUE}/actioned/addMarkup`, {params} );
// 战败跳转
export const skipDefeatReason = params => axios.get(`${SERVER.CYXDMS_CLUE}/defeatReason/listDefeatReasonType`, {params});
//预约管理--跟进计划接口
export const getFinPanActionDate = (id, ownerCode) => axios.get(`${SERVER.CYXDMS_CLUE}/appoint/getFinPanActionDate?customerBusinessId=${id}&shardingOwnerCode=${ownerCode}`);
//预约管理--跟进方式
export const queryVisitingModeInfo7 = params => axios.get(`${SERVER.CYXDMS_CLUE}/customerManage/industryCategory/queryVisitingModeInfo7?pageNum=1&currentPage=1&pageSize=20&limit=20&isValid=10041001`, {params});
// 战败经销商列表
export const defeatedDealer = params => axios.post(`${SERVER.SYSMANAGE}/company/org/getDealerByParam`, params );
// 获取待定潜客跟进时间（返回时间为小时）
export const getPendingTime = params => axios.get(`${SERVER.CYXDMS_CLUE}/clue/getUndeterminFollowUpTime`, {params} );
